package com.milepost.workflow.flowinst.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.milepost.workflow.flowdef.entity.FlowDefEntity;
import lombok.Data;

import java.util.Date;

/**
 * @author huarf
 * @Description
 * @create 2022-03-27 16:50
 */
@Data
@TableName("flow_inst")
public class FlowInstEntity {

    private String id;
    private String flowDefId;
    private String name;
    //流程实例序列号，格式如  20220331A01、20220331A02、、、20220331A99、20220331B01
    private String sn;
    private String des;
    private String startUser;
    @TableField(exist = false)
    private String startUserName;
    private Date startTime;
    private Date endTime;
    private String currTaskId;
    @TableField(exist = false)
    private String currTaskName;
    private Integer pass;

    public FlowInstEntity() {

    }

    public FlowInstEntity(FlowDefEntity flowDefEntity) {

        this.flowDefId = flowDefEntity.getId();
        this.name = flowDefEntity.getName();
        this.des = flowDefEntity.getDes();
    }

}
